//
//  ViewController.m
//  音频
//
//  Created by dllo on 16/8/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>
@interface ViewController ()
@property (nonatomic,strong) UIView *myView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    [UIView beginAnimations:@"move" context:nil];
    [UIView setAnimationDuration:2];
    [UIView setAnimationDelegate:self];
    [UIView commitAnimations];

    [UIView beginAnimations:@"color" context:nil];
    _myView.backgroundColor = [UIColor redColor];

    [UIView beginAnimations:@"alpha" context:nil];
    
    [UIView animateWithDuration:3 animations:^{
        NSLog(@"start");
    } completion:^(BOOL finished) {
        NSLog(@"finished");
    }];

    [UIView animateWithDuration:0.5 delay:3 options:UIViewAnimationOptionRepeat animations:^{
        
    } completion:^(BOOL finished) {
        
    }];

    [UIView animateKeyframesWithDuration:3 delay:0.0 options:UIViewKeyframeAnimationOptionRepeat animations:^{
        
    } completion:^(BOOL finished) {
        
    }];
    

}

- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
{
    
}


@end
